package com.jiangruan.javaproject.service;

import com.alibaba.fastjson.JSONObject;
import com.jiangruan.javaproject.Constants;
import com.jiangruan.javaproject.bean.Epidemi;
import com.jiangruan.javaproject.request.HttpUtils;

/**
 * @author:xulonghua
 * @email:3162193565@qq.com
 * @desc:聚合函数2021出行防疫政策指南
 * @datetime 2021/12/26 15:10
 */
public class EpidemiCprevention {
public Epidemi  epidemicprevention(){
    String url= Constants.EPIDEMI_URL+"?key="+Constants.EPIDEMI_KEY;
    String result = HttpUtils.get ( url );
    //json解析
    Epidemi epidemiCprevent = JSONObject.parseObject ( result, Epidemi.class );
    return  epidemiCprevent;
}

    public static void main(String[] args) {

}
}
